//
//  HappyViewController.swift
//  HiBook
//
//  Created by Apple on 16/8/12.
//  Copyright © 2016年 Apple. All rights reserved.
//

import UIKit

class HappyViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.view.backgroundColor = UIColor.whiteColor()
        
        let bgImageView = UIImageView(frame: CGRectMake((SCREEN_WIDTH-97)/2, 200, 97, 127))
        bgImageView.image = UIImage(named: "dog")

        let bgLabel = UILabel(frame: CGRectMake((SCREEN_WIDTH-200)/2,CGRectGetMaxY(bgImageView.frame),200,50))
        bgLabel.text = "正在鞭打攻城狮>_<"
        bgLabel.font = UIFont(name: MAIN_FONT, size: 18)
        bgLabel.textColor = MAIN_COLOR
        bgLabel.textAlignment = NSTextAlignment.Center
        
        let button = UIButton(frame: CGRectMake(20,20,35,35))
        button.setImage(UIImage(named: "close"), forState: .Normal)
        button.addTarget(self, action: #selector(self.closeBtn), forControlEvents: .TouchUpInside)
        
        self.view.addSubview(bgImageView)
        self.view.addSubview(bgLabel)
        self.view.addSubview(button)
        // Do any additional setup after loading the view.
    }
 
    func closeBtn(){
        self.dismissViewControllerAnimated(true) { 
            
            
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
